package com.xj.edu.hotel.ExceptionHandler;


import java.io.Serializable;

public class ApiResult implements Serializable {
    //禁止new对象创建
    private ApiResult() {
    }

    /**
     * 统一创建ApiResult方便后期扩展
     * @return
     */
    public static ApiResult newInstance(){
        return  new ApiResult();
    }

    //提示消息
    private String msg;
    //状态信息
    private boolean flag = true;
    //返回结构
    private Object result;
    //查询出的结构总数
    private int rows;
    //需要跳转的路径
    private String url;
    //接口对应的毫秒时间
    private long time;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }
}
